#ifndef QY_BMS_Data_H
#define QY_BMS_Data_H

//创建于2025-07-17
#include "qglobal.h"
#include <QStringListModel>
#include "QStandardItem"
#include "CANCard/GC/ECanVci.h"
#include "selffun.h"
class QY_BMS_Data
{
public:
    static void EQ_0x1801DAB1(quint8 data[]); 
    static void EQ_0x1802DAB1(quint8 data[]); 
    static void EQ_0x1803DAB1(quint8 data[]); 
    static void EQ_0x1804DAB1(quint8 data[]); 
    static void EQ_0x1805DAB1(quint8 data[]); 
    static void EQ_0x1806DAB1(quint8 data[]); 
    static void EQ_0x1807DAB1(quint8 data[]); 
    static void EQ_0x1808DAB1(quint8 data[]); 
    static void CAN_loss_rest(int count);
    static void rest_data_ma();  //控制参数复位
    static void rest_data_info();  //信息参数复位
    static void Fault_processing();  //故障处理
    static void EQ_runinfo();   //设备运行信息
    };

typedef struct QY_BMS_Data_INFO
{
    QString name= "QY_BMS";
    float V_F1;
    float V_F2;
    float V_F3;
    float V_F4;
    float V_F5;
    float V_F6;
    float V_F7;
    float V_F8;
    float V_F9;
    float V_F10;
    float V_F11;
    float V_F12;
    float V_F13;
    float V_F14;
    float V_F15;
    float V_F16;
    float V_F17;
    float V_F18;
    quint16 AD_V;
    float Power_V1;
    float PCB_TEMP;
    quint8 Channel_NUB;
    bool OC_EN;
    bool DO_OC;
    bool Alarm_TEMP1_Hi;
    bool Alarm_TEMP1_Li;
    bool Alarm_TEMP2_Hi;
    bool Alarm_TEMP2_Li;
    bool Alarm_BMS_A_Hi;
    bool Alarm_BMS_A_Li;
    bool Alarm_V_F_Hi;
    bool Alarm_V_F_Li;
    bool Alarm_V_SUM_Hi;
    bool Alarm_V_SUM_Li;
    bool Power_V1_ERR;
    bool Power_3V_ERR;
    bool TEMP1_ERR;
    bool TEMP2_ERR;
    bool BMS_A_ERR;
    bool STOP_TEMP1_Hi;
    bool STOP_TEMP1_Li;
    bool STOP_TEMP2_Hi;
    bool STOP_TEMP2_Li;
    bool STOP_BMS_A_Hi;
    bool STOP_BMS_A_Li;
    bool STOP_V_F_Hi;
    bool STOP_V_F_Li;
    bool STOP_V_SUM_Hi;
    bool STOP_V_SUM_Li;
    float TEMP1;
    float TEMP2;
    float BMS_A;
    float V_SUM;
    float V_MAX;
    float V_MIN;
    float V_AVG;
    float V_VAR;
    QStringListModel FaultListModel; //故障列表
    QStringList FaultList; //故障列表
    quint8 CAN_count;   //计数器
    quint8 CAN_count_0x1801DAB1;
    quint8 CAN_count_0x1802DAB1;
    quint8 CAN_count_0x1803DAB1;
    quint8 CAN_count_0x1804DAB1;
    quint8 CAN_count_0x1805DAB1;
    quint8 CAN_count_0x1806DAB1;
    quint8 CAN_count_0x1807DAB1;
    quint8 CAN_count_0x1808DAB1;
}QY_BMS_Data_INFO;
typedef struct QY_BMS_Data_MA
{
}QY_BMS_Data_MA;
extern QY_BMS_Data_INFO QY_BMS_Data_info;
extern QY_BMS_Data_MA QY_BMS_Data_ma;
extern QStandardItemModel QY_BMS_Data_mode_info;
#endif
